/* ****************************************************************************
 *
 * Copyright (c) Microsoft Corporation. 
 *
 * This source code is subject to terms and conditions of the Microsoft Public License. A 
 * copy of the license can be found in the License.html file at the root of this distribution. If 
 * you cannot locate the  Microsoft Public License, please send an email to 
 * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound 
 * by the terms of the Microsoft Public License.
 *
 * You must not remove this notice, or any other, from this software.
 *
 * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
 * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
 * PARTICULAR PURPOSE.
 * ***************************************************************************/


// TestpglView.cpp : implementation file
//

#include "stdafx.h"
#include "testpgl.h"
#include "TestpglView.h"
#include "TestpglDoc.h"


#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif


/////////////////////////////////////////////////////////////////////////////
// CTestpglView

IMPLEMENT_DYNCREATE(CTestpglView, CPGLView)

CTestpglView::CTestpglView()
{
}

CTestpglView::~CTestpglView()
{
}


BEGIN_MESSAGE_MAP(CTestpglView, CPGLView)
	//{{AFX_MSG_MAP(CTestpglView)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CTestpglView drawing

void CTestpglView::OnDraw(CDC* pDC)
{
	CTestpglDoc* pDoc = (CTestpglDoc*)GetDocument();

	SetRegion( pDoc->GetRegion());

	CPGLView::OnDraw(pDC);
}

/////////////////////////////////////////////////////////////////////////////
// CTestpglView diagnostics

#ifdef _DEBUG
void CTestpglView::AssertValid() const
{
	CPGLView::AssertValid();
}

void CTestpglView::Dump(CDumpContext& dc) const
{
	CPGLView::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CTestpglView message handlers

BOOL CTestpglView::OnPreparePrinting(CPrintInfo* pInfo) 
{
	// TODO: call DoPreparePrinting to invoke the Print dialog box
	
	return CPGLView::OnPreparePrinting(pInfo);
}

void CTestpglView::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo) 
{
	// TODO: Add your specialized code here and/or call the base class
	
	CPGLView::OnBeginPrinting(pDC, pInfo);
}

void CTestpglView::OnEndPrinting(CDC* pDC, CPrintInfo* pInfo) 
{
	// TODO: Add your specialized code here and/or call the base class
	
	CPGLView::OnEndPrinting(pDC, pInfo);
}

void CTestpglView::OnPrint(CDC* pDC, CPrintInfo* pInfo) 
{
	// TODO: Add your specialized code here and/or call the base class
	
	CPGLView::OnPrint(pDC, pInfo);
}
